GetIniString
Result$ = GetIniString(Filename$, Section$, Key$, DefaultValue$)
 
Parameters:

    Filename$ = the name of the Ini file
    Section$ = the section name
    Key$ = the key name
    DefaultValue$ = the default value
Returns:

    Result$
 

GetIniString returns a string value from an Ini file. Filename$ specifies the name of the Ini file, Section$ the section and Key$ the key from where the function reads the value. If the function cannot find the key it will return the value specified in DefaultValue$.


If we have an Ini file called "example.ini" that looks like this:
  
  [SectionA]
  ValueA1=12
  ValueA2=Hello
  ValueA3=1.234
  
  [SectionB]
  ValueB1=21
  ValueB2=World
  ValueB3=4.321
  


GetIniString("example.ini", "SectionA", "ValueA2", "-") would return Hello
GetIniString("example.ini", "SectionB", "ValueB1", "-") would return World
GetIniString("example.ini", "SectionB", "AValue", "-") would return -
 
Related Info: GetIniFloat | GetIniInteger :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com